/*
 * @Author: zhanglianchang
 * @Date: 2020-08-01 14:39:32
 * @Last Modified by: taoshiwei
 * @Last Modified time: 2019-04-29 14:57:26
 *
 * 标签有关的接口：自己写吧~~  已经被张老师删了 ^_^
 */

import { createAPI } from "@/utils/request";

// 获取目录下拉框
export const tagsList = (data) => createAPI("/tags", "GET", data);


// 获取标签列表
export const getTags = (data) => createAPI("/tags", "get", data);

// 标签简单列表
export const simple = data => createAPI('/tags/simple', 'get', data)

// 标签详情
export const detail = data => createAPI(`/tags/${data.id}`, 'get', data)

 // 标签添加
 export const add = data => createAPI('/tags', 'post', data)

 // 标签修改
 export const update = data => createAPI(`/tags/${data.id}`, 'put', data)

// 删除标签列表

export const removeTags = data => createAPI(`/tags/${data.id}`, 'delete', data)

 // 标签状态
export const changeState = data => createAPI(`/tags/${data.id}/${data.state}`, 'post', data)

